<h1>New product</h1>

<ul>
	<li style="float:left"><span>Produkte verwalten</span>
		<ul>
			<li><a href="../products/new">Neu</a></li>
			<li><a href="../products">Bearbeiten</a></li>
		</ul>
	</li>
	<li style="margin-left:200px"><span>Kategorien verwalten</span>
		<ul>
			<li><a href="../categories/new">Neu</a></li>
			<li><a href="../categories">Bearbeiten</a></li>
		</ul>
	</li>
</ul>

<% form_for(@product) do |f| %>
  <%= f.error_messages %>

  <p>
    <%= f.label :name %><br />
    <%= f.text_field :name %>
  </p>
  <p>
    <%= f.label :price %><br />
    <%= f.text_field :price %>
  </p>
  <p>
    <%= f.label :category %>
    <%= f.select("category_id", Category.all.collect {|p| [p.name, p.id]}, {:prompt => 'Select Category'}) %>
  </p>
  <p>
    <%= f.label :image_path %><br />
    <%= f.text_field :image_path %>
  </p>
  <p>
    <%= f.label :description %><br />
    <%= f.text_field :description %>
  </p>
  <p>
    <%= f.submit 'Create' %>
  </p>
<% end %>

<%= link_to 'Back', products_path %>